import request from '@/utils/request'
import { parseStrEmpty } from "@/utils/ruoyi";

// 查询评论订单列表
export function listOrderComment(data) {
  return request({
    url: '/order/comment/orderCommentList',
    method: 'post',
    data: data
  })
}

// 查询评论订单详细
export function getOrderComment(commentId) {
  return request({
    url: '/order/comment/' + parseStrEmpty(commentId),
    method: 'get'
  })
}

// 新增评论订单
export function orderCommentCreate(data) {
  return request({
    url: '/order/comment/orderCommentCreate',
    method: 'post',
    data: data
  })
}

// 修改评论订单
export function updateOrderComment(data) {
  return request({
    url: '/order/comment',
    method: 'put',
    data: data
  })
}

// 删除评论订单
export function delOrderComment(commentId) {
  return request({
    url: '/order/comment/' + commentId,
    method: 'delete'
  })
}

// 评论订单状态修改
export function changeOrderCommentStatus(commentId, status) {
  const data = {
    commentId,
    status
  }
  return request({
    url: '/order/comment/orderCommentChangeStatus',
    method: 'put',
    data: data
  })
}